import javax.swing.text.Style;
import java.util.Scanner;

//编写一个Java程序，从用户键盘输入读取两个整数，
// 并计算它们的和与差，然后输出结果。
public class Demo06 {
    public static void main(String[] args) {
      Scanner scanner= new Scanner(System.in);
        System.out.println("请输入一个整数");
        int number1 = scanner.nextInt();
        System.out.print("请输入第二个整数: ");
        int number2 = scanner.nextInt();
        int sum = number1 + number2;
        int difference = number1 - number2;
        System.out.println("两个数的和是: " + sum);
        System.out.println("两个数的差是: " + difference);

    }
}
